package de.uni.bremen.estudent.lbs.util;


import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import de.uni.bremen.estudent.lbs.service.MensaUpdateService;


/**
 * Receiver for the date change event.
 * 
 * @author bahlfeld
 * @version 1.0 30.01.2012
 */
public final class DateChangedReceiver extends BroadcastReceiver {

    /**
     * Starts a new service, which updates the mensa-meal table.
     */
    @Override
    public void onReceive(final Context context, Intent intent) {
        Intent updateService = new Intent(context, MensaUpdateService.class);
        updateService.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        context.startService(updateService);
    }

}
